package ruiFight.collect.service.base;

import java.io.Serializable;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import ruiFight.collect.dao.base.BaseDaoMapper;
@Service
public class BaseServiceImpl<T, PK extends Serializable> implements BaseService<T, PK>{
	private BaseDaoMapper<T, PK> baseDaoMapper;

	public BaseDaoMapper<T, PK> getBaseDaoMapper() {
		return baseDaoMapper;
	}
	@Autowired
	public void setBaseDaoMapper(BaseDaoMapper<T, PK> baseDaoMapper) {
		this.baseDaoMapper = baseDaoMapper;
	}
	public int deleteByPrimaryKey(PK p) {
		// TODO Auto-generated method stub
		return baseDaoMapper.deleteByPrimaryKey(p);
	}
	public int insert(T t) {
		// TODO Auto-generated method stub
		return baseDaoMapper.insert(t);
	}
	public int insertSelective(T t) {
		// TODO Auto-generated method stub
		return baseDaoMapper.insertSelective(t);
	}
	public T selectByPrimaryKey(PK p) {
		// TODO Auto-generated method stub
		return baseDaoMapper.selectByPrimaryKey(p);
	}
	public int updateByPrimaryKeySelective(T t) {
		// TODO Auto-generated method stub
		return baseDaoMapper.updateByPrimaryKeySelective(t);
	}
	public int updateByPrimaryKey(T t) {
		// TODO Auto-generated method stub
		return baseDaoMapper.updateByPrimaryKey(t);
	}
	
	
	
}
